

class StudentTest {
    private String name;
    String id;
    protected char sex;
    public int age;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public char getSex() {
        return sex;
    }

    public void setSex(char sex) {
        this.sex = sex;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    {
        name = "大哥";
        id = "123123";
        sex = '男';
        age = 24;
    }
    void show() {
        System.out.println("姓名："+name+"性别"+sex);
    }
}
